import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/home"
  },
  {
    /* localhost:7777/home */
    path: '/home',
    redirect:"/home/service",
    component: () => import('../views/HomeView.vue'),
    children:[
      {
        /* localhost:7777/home/login */
        path:'login',
        component: () => import('../views/LoginView.vue'),
      },
      {
        /* localhost:7777/home/service */
        path:'service',
        component: () => import('../views/ServiceView.vue'),
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router